import { WorkStatusStr, workStatusTagColor } from '@/model/work'

/** work状态过滤器 */
export const workStatusFormatter = (status: ApiWork.DefaultStatus) => {
  if (status === 2) return '合成失败'
  return status <= 3 ? '合成中' : WorkStatusStr[status]
}

/** work状态颜色过滤器 */
export const workStatusColorFormatter = (status: ApiWork.DefaultStatus): any => {
  return workStatusTagColor[status] ? workStatusTagColor[status] : ''
}
